home *** CD-ROM | disk | FTP | other *** search
Text File | 1987-01-26 | 1.6 KB | 71 lines | [TEXT/MPS ] |
- set exit 0 #so 'cancel' buttons not fatal
-
- "{MPW}macros:getResAttrs" MENU
- #set id "`request 'Menu ID?'`"
- set mdef "`request -d textMenuProc 'ID of MenuDef proc?'`"
- set flags "`request -d allEnabled 'Enable flags (8 hex digits)'`"
- set mEnable "`request -d enabled 'Enable Menu?'`"
- set title "`request 'Title? (type "apple" for that menu)'`"
-
- #put overall info together here
- copy •:Δ/∂n/ "{scr}" #get saved ID
- paste § "{active}"
- echo ",∂t∂t∂t∂/* ID *∂/"
- echo "{mdef},∂t∂/* menu def proc ID *∂/"
- echo "{flags},∂t∂t∂/* item flags *∂/"
- echo "{mEnable},∂t∂t∂t∂/* menu enable *∂/"
- if {title} =~ /[Aa]pple/
- echo "{title},"
- else
- echo "∂"{title}∂","
- end
- echo -n "∂t∂{ "
-
- #put together menu items
- set ict 0 #item count
- loop
- set ititle "`request 'Item?'`"
- break if ({status} != 0) OR ("{ititle}" == "")
- set icon "noIcon"
- set key "noKey"
- set char "noMark"
- set style "plain"
- confirm "Skip item attributes?"
- if {status} != 0 #wants attibutes
- begin
- set icon "`request -d noIcon 'Icon No? (1-based; I will adust)'`"
- if {icon} != "noIcon"
- set icon `evaluate {icon} + 256`
- end
- set key "`request -d noKey 'Key equivalent?'`"
- confirm "Check?"
- if {status} == 0
- set char check
- else
- set char "noMark"
- end
- confirm "Bold?"
- if {status} == 0
- set style bold
- else
- set style "plain"
- end
- end
- end
- if {ict} != 0 ; echo -n "∂t " ; end # alignment
- echo "∂"{ititle}∂","
- echo -n "∂t {icon},"
-
- if {key} != "noKey" #don't quote noKey
- echo -n "∂"{key}∂","
- else
- echo -n "{key},"
- end
-
- echo "{char},{style};"
- set ict `evaluate {ict} + 1`
- end
-
- cut \;\ "{active}" #no ; after last entry
- echo "∂n∂t∂}∂n∂};"
-